package oop1.Task;

public class MotorTest {
    public static void main(String[] args) {
        Motor a = new Motor();
        //    a.weight=100;   //为什么报错?
        //      double b=100;   //不报错
        a.weight =100.0;
        a.price=9000.0;
        a.brand="三菱";
        a.show();
        System.out.println();
        System.out.println("改变a对象的价格");
        a.price=10000.0;
        a.show();

        System.out.println();
        Motor b=new Motor();
        b.weight =200.0;
        b.price=7500.0;
        b.brand="雷神";
        b.show();
    }
}
